package configuration;

import javax.annotation.PostConstruct;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.core.env.Environment;

import common.PropertyNames;
import lombok.extern.log4j.Log4j;

@Log4j
@Configuration
@PropertySource(value = { "classpath:conf/configuration.properties" })
public class SettingConfiguration {

	@Autowired
	private Environment env;
	
	public SettingConfiguration(){
		log.info("[Initialize Setting Configuration]");
	}
	
	@PostConstruct
	public void settingProperties(){
		System.setProperty(PropertyNames.UPLOAD_PATH, env.getProperty(PropertyNames.UPLOAD_PATH));
	}
}
